#! /bin/bash
export LANG=zh_CN.UTF-8
PRESTO_HOME=/export/server/presto/bin/presto


${PRESTO_HOME} --catalog hive --server 192.168.88.80:8090 --execute "
insert into hive.edu_dwd.kxh_fact_web_chat_ems
select id,
       session_id,
       sid,
       create_time,
        seo_source,
       ip,
       area,
       origin_channel,
    coalesce(msg_count,0)as msg_count
from hive.edu_ods.web_chat_ems_2019_07;

insert into  hive.edu_dwd.kxh_fact_web_chat_text_ems
select id,
       from_url
from hive.edu_ods.web_chat_text_ems_2019_07;
"
